<div class="page-header">
	<h1>顧客検索</h1>
</div>
<?php echo validation_errors(); ?>
<form class="" action="search" method="post">
	<table class="table table-bordered">
		<colgroup>
			<col width="15%" />
			<col width="35%" />
			<col width="15%" />
			<col width="35%" />
		</colgroup>
		<tr>
			<td colspan="4">&nbsp;&nbsp;検索条件</td>
		</tr>
		<tr>
			<td>顧客コード</td>
			<td>
				<input type="text" class="" value="" placeholder="" />
				<label style="font-size:0.6em;color:blue;">[16桁]</label> ~  
				<input type="text" class="" value="" placeholder="" />
				<label style="font-size:0.6em;color:blue;">[16桁]</label>
			</td>
			<td>顧客名</td>
			<td>
				<input type="button" class="" value="全角" placeholder="" style="font-size:0.8em;width:53px;"/>
				<input type="text" class="" value="" placeholder="" size="30%" />
				<label style="font-size:0.6em;color:blue;">[40桁] ※部分一致</label>
			</td>
		</tr>
		<tr>
			<td>顧客グループ</td>
			<td>
	    		<select style="width:80%;">
					<option value="1">all</option>
					<option value="2" selected>Group1</option>
					<option value="3">Group2</option>
					<option value="4">Group3</option>
					<option value="5">Group4</option>
					<option value="6">Group5</option>
					<option value="7">Group6</option>
				</select>
			</td>
			<td>顧客名カナ</td>
			<td>
				<input type="button" class="" value="全角カナ" placeholder="" style="font-size:0.8em;width:53px;"/>
				<input type="text" class="" value="" placeholder="" size="30%" />
				<label style="font-size:0.6em;color:blue;">[80桁] ※部分一致</label>
			</td>
		</tr>
		<tr>
			<td>電話番号</td>
			<td>
				<input type="text" class="" value="" placeholder="" />
				<label style="font-size:0.6em;color:blue;">[16桁] ※完全一致(ハイフンなし)</label>
			</td>
			<td>メールアドレス</td>
			<td>
				<input type="text" class="" value="" placeholder="" size="30%" />
				<label style="font-size:0.6em;color:blue;">[256桁] ※部分一致</label>
			</td>
		</tr>
		<tr>
			<td>会員状態</td>
			<td>
				<input type="radio" name="customer_cond" value="all" id="cus_cond_all"><label for="cus_cond_all">&nbsp;全て&nbsp;&nbsp;</label>
				<input type="radio" name="customer_cond" value="cond1" id="cus_cond_1" checked="checked"><label for="cus_cond_1">&nbsp;通常&nbsp;&nbsp;</label>
				<input type="radio" name="customer_cond" value="cond2" id="cus_cond_2"><label for="cus_cond_2">&nbsp;退会希望&nbsp;&nbsp;</label>
				<input type="radio" name="customer_cond" value="cond3" id="cus_cond_3"><label for="cus_cond_3">&nbsp;退会済み&nbsp;&nbsp;</label>
			</td>
			<td>情報メール</td>
			<td>
				<input type="radio" name="info_mail_cond" value="all" id="info_mail_cond_all" checked="checked"><label for="info_mail_cond_all">&nbsp;両方&nbsp;&nbsp;</label>
				<input type="radio" name="info_mail_cond" value="cond1" id="info_mail_cond_1"><label for="info_mail_cond_1">&nbsp;希望しない&nbsp;&nbsp;</label>
				<input type="radio" name="info_mail_cond" value="cond2" id="info_mail_cond_2"><label for="info_mail_cond_2">&nbsp;希望する&nbsp;&nbsp;</label>
			</td>
		</tr>
		<tr>
			<td>PC/携帯</td>
			<td colspan="3">
				<input type="radio" name="mail_cond" value="all" id="mail_cond_all" checked="checked"><label for="mail_cond_all">&nbsp;両方&nbsp;&nbsp;</label>
				<input type="radio" name="mail_cond" value="cond1" id="mail_cond_1"><label for="mail_cond_1">&nbsp;PC&nbsp;&nbsp;</label>
				<input type="radio" name="mail_cond" value="cond2" id="mail_cond_2"><label for="mail_cond_2">&nbsp;携帯&nbsp;&nbsp;</label>
				<label style="font-size:0.6em;color:blue;">※顧客メールアドレスのドメイン名をもとに絞り込みます。</label>
			</td>
		</tr>
		<tr>
			<td colspan="4">&nbsp;</td>
		</tr>
	</table>
	
	<table style="border: 0px;width:100%;">
		<colgroup>
			<col width="100%" />
		</colgroup>
		<tr>
			<td>
				<label style="color:blue;">※情報メールは会員状態が&nbsp;「退会希望」&nbsp;「退会済み」、またはログイン不可の顧客には送信されません。</label>
			</td>
		</tr>
		<tr>
			<td align="right">
				<button type="submit" class="btn btn-default" style="width:120px;">検索する</button>
				<button type="submit" class="btn btn-default" style="width:120px;">CSV出力</button>
				<button type="submit" class="btn btn-default" style="width:120px;">DM宛先出力</button>
			</td>
		</tr>
	</table>
</form>
<br />

<div class="bs-example" data-example-id="striped-table">
	<table class="table table-bordered">
		<colgroup>
			<col width="2%" />
			<col width="13%" />
			<col width="13%" />
			<col width="30%" />
			<col width="12%" />
			<col width="8%" />
			<col width="8%" />
			<col width="8%" />
			<col width="10%" />
		</colgroup>
		<thead>
			<tr>
				<th><input type="checkbox"></th>
				<th>顧客コード</th>
				<th>顧客名</th>
				<th>メールアドレス</th>
				<th>電話番号</th>
				<th></th>
				<th></th>
				<th></th>
				<th>メール</th>
			</tr>
		</thead>
	<?php
	foreach ( $list as $entry ) {
		?>
      <tbody>
			<tr>
				<td></td>
				<td><?=$entry->customer_code?></td>
				<td>
				<a href="/zswebshop/index.php/admin/customer/detail/<?=$entry->customer_code?>"><?=$entry->first_name?><?=$entry->last_name?></a>
				</td>
				<td><?=$entry->email?></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</tbody>
	<?php
	}
	?>
    </table>
	<table style="border: 0px;width:100%;">
		<colgroup>
			<col width="100%" />
		</colgroup>
		<tr>
			<td align="right">
				<button type="submit" class="btn btn-default" style="width:120px;">退会する</button>
			</td>
		</tr>
	</table>
</div>
<!-- /example -->
